home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / FWOvlShp.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.4 KB  |  89 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWOvlShp.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWOVLSHP_H
  11. #define FWOVLSHP_H
  12.  
  13. #ifndef FWSHAPE_H
  14. #include "FWShape.h"
  15. #endif
  16.  
  17. #ifndef FWBNDSHP_H
  18. #include "FWBndShp.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. //    Forward Declarations
  23. //========================================================================================
  24.  
  25. class FW_CGraphicContext;
  26.  
  27. //========================================================================================
  28. //    class FW_COvalShapeRep
  29. //========================================================================================
  30.  
  31. class FW_COvalShape : public FW_CBoundedShape
  32. {
  33. public:
  34.     FW_DECLARE_CLASS
  35.     FW_DECLARE_AUTO(FW_COvalShape)
  36.  
  37.  
  38. //----------------------------------------------------------------------------------------
  39. //    Constructors/Destructors
  40. //
  41. public:
  42.     FW_COvalShape(const FW_CRect& rect,
  43.                   FW_ERenderVerbs renderVerb,
  44.                   const FW_CInk& ink = FW_kNormalInk,
  45.                   const FW_CStyle& style = FW_kNormalStyle);
  46.  
  47.     FW_COvalShape(const FW_COvalShape& other);
  48.     FW_COvalShape(FW_CReadableStream& stream);
  49.     
  50.     virtual ~ FW_COvalShape();
  51.     
  52. //----------------------------------------------------------------------------------------
  53. //    Inherited API
  54. //
  55. public:
  56.     // ----- Hit Testing -----
  57.     virtual FW_Boolean HitTest(FW_CGraphicContext& gc,
  58.                                 const FW_CPoint& test,
  59.                                 FW_Fixed tolerance) const;
  60.  
  61.     // ----- Copying -----
  62.     virtual FW_CShape*            Copy() const;
  63.     
  64.     // ----- Rendering -----
  65.     virtual void                 Render(FW_CGraphicContext& gc) const;
  66.     
  67. //----------------------------------------------------------------------------------------
  68. //    New API
  69. //
  70. public:
  71.     // ----- Geometry -----
  72.     void            GetGeometry(FW_CRect& rect) const
  73.                         {rect = fRect;}
  74.     void            SetGeometry(const FW_CRect& rect)
  75.                         {fRect = rect;}
  76.  
  77.     // ----- Rendering -----
  78.     static void    RenderOval(FW_CGraphicContext& gc,
  79.                                 const FW_CRect& rect, 
  80.                                 FW_ERenderVerbs renderVerb,
  81.                                 const FW_CInk& ink = FW_kNormalInk,
  82.                                 const FW_CStyle& style = FW_kNormalStyle);
  83.  
  84.     // ----- Archiving -----
  85.     static void*    Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  86. };
  87.  
  88. #endif
  89.